home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlComboSetExtendedUI.au3 < prev    next >
Text File  |  2006-06-17  |  1KB  |  39 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt('MustDeclareVars',1)
  5.  
  6. Dim $Combo,$Btn_Exit,$Status,$msg,$Btn_Standard,$Btn_Extended,$state,$current
  7.  
  8. GuiCreate("ComboBox Set Extended UI", 392, 254)
  9.  
  10. $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 120)
  11. GUICtrlSetData($Combo,"AutoIt|v3|is|freeware|BASIC-like|scripting|language")
  12. $Btn_Standard = GuiCtrlCreateButton("Standard", 75, 90, 90, 30)
  13. $Btn_Extended = GuiCtrlCreateButton("Extended", 200, 90, 90, 30)
  14. $Btn_Exit = GuiCtrlCreateButton("Exit", 150, 180, 90, 30)
  15. $Status = GUICtrlCreateLabel("",0,234,392,20,BitOR($SS_SUNKEN,$SS_CENTER))
  16. $current = Not $state
  17. GuiSetState()
  18. While 1
  19.     $msg = GuiGetMsg()
  20.     Select
  21.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  22.             ExitLoop
  23.         Case $msg = $Btn_Standard
  24.             _GUICtrlComboSetExtendedUI($Combo, 0)
  25.         Case $msg = $Btn_Extended
  26.             _GUICtrlComboSetExtendedUI($Combo, 1)
  27.         Case Else
  28.             $state = _GUICtrlComboGetExtendedUI($Combo)
  29.             If($state And $state <> $current) Then
  30.                 $current = $state
  31.                 GUICtrlSetData($Status,"Extend UI: True")
  32.             ElseIf($state <> $current) Then
  33.                 $current = $state
  34.                 GUICtrlSetData($Status,"Extend UI: False")
  35.             EndIf
  36.     EndSelect
  37. WEnd
  38. Exit
  39.